<script type="text/javascript">
function return_data_brg( a, b, c, d ) {
	var baris = eval(parent.opener.document.form.jmlrow).value;

	eval("parent.opener.document.form.prod_id"+baris).value = a;
	eval("parent.opener.document.form.product"+baris).value = b;
	
	
	window.self.close();
	return false;
}
</script>
<h2>List Product</h2>
<table>
	<thead>
		<tr>
			
			<th>Prod Id</th>
			<th>Product</th>
			
		
			
		</tr>
	</thead>
	<tbody>
		<?php
	$no=1;
	$df=mysql_query("select * from product");
	while($r=mysql_fetch_array($df)){		
		$output = "<tr>";
		
		$output .= "<td>".$r['prod_id']."</td>";
		$output .= "<td><a href='#' onclick=\"return_data_brg('".$r['prod_id']."', '".$r['product']."')\"><strong>".$r['product']."</strong></a></td>";
		
		
		
		$output .= "</tr>";
		
		print $output;
		$no++;
	}
	?>
	</tbody>
</table>